<template>
  <div class="component-icon-btn" @click="handleRedo">
    <div class="component-icon-btn-icon">
      <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
        <path d="M3 14v-3a4 4 0 014-4h3V6H7a5 5 0 00-5 5v3h1zm7.016-11.282v7.543l4.29-3.73z" fill="#3D4757" />
      </svg>
    </div>
  </div>
</template>
<script>
import {
  undoManager
} from '../Utils.js'

export default {
  props: {
    context: {
      type: Object,
      required: true
    }
  },
  data: function() {
    return {

    }
  },
  mounted: function() {

  },
  methods: {
    handleRedo() {
      if (undoManager.hasRedo()) {
        undoManager.redo()
      } else {
        this.$message('当前没有内容可以重做')
      }
    }
  }

}
</script>
